package com.atmilan.quartz.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.atmilan.quartz.mapper.StoreProductReplyMapper;
import com.atmilan.quartz.model.entity.crmeb.StoreProductReply;
import com.atmilan.quartz.service.IStoreProductReplyService;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
 * 
 * @Description: 
 * @author daigb
 * @date 2021-01-07
 */
@Service
public class StoreProductReplyServiceImpl extends ServiceImpl<StoreProductReplyMapper, StoreProductReply> implements IStoreProductReplyService {

    /**
     * 订单是否已回复
     * @param unique 订单id
     * @param replayType 类型
     * @return 回复内容
     */
    @Override
    public List<StoreProductReply> isReply(String unique, String replayType, Integer orderId) {
        return list(Wrappers.<StoreProductReply>lambdaQuery()
                .eq(StoreProductReply::getUnique, unique)
                .eq(StoreProductReply::getReplyType, replayType)
                .eq(StoreProductReply::getOid, orderId));
    }

}
